package Work.com;

import java.util.Objects;
import java.util.Scanner;

public class Exam03 {
    public static boolean opString(String str){

        for (int i = 0; i < str.length() / 2; i++) {
            String a = String.valueOf(str.charAt(i));
            String b = String.valueOf(str.charAt(str.length() - i - 1));
            if (a.equals(b)){
                return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串");
        String str = sc.next();
        if (opString(str) == true){
            System.out.println(str + "为对撑字符串");
        }else {
            System.out.println(str + "不是对撑字符串");
        }
    }
}
